package org.shortlink.admin.common.convention.exception;

import org.shortlink.admin.common.convention.errorcode.BaseErrorCode;
import org.shortlink.admin.common.convention.errorcode.IErrorCode;

public class ClientException extends AbstractException {
    public ClientException(IErrorCode errorCode) {
        this(null, null, errorCode);
    }

    public ClientException(IErrorCode errorCode, String message) {
        this(message, null, errorCode);
    }

    public ClientException(String message) {
        this(message, null, BaseErrorCode.CLIENT_ERROR);
    }

    public ClientException(String message, Throwable throwable, IErrorCode errorCode) {
        super(message, throwable, errorCode);
    }

    @Override
    public String toString() {
        return "ClientException {code='" + errorCode + "', message='" + errorMessage + "'}";
    }

}
